-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Step editor improvements #297
Step editor improvements #297
Conversation
Added support for text color rendering as well as support for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
webapp/src/app/components/widgets/event-widget/event-registry/show-modal-choice.ts
Outdated
Show resolved
Hide resolved
webapp/src/app/components/widgets/event-widget/event-registry/abstract-event.ts
Outdated
Show resolved
Hide resolved
webapp/src/app/components/widgets/event-widget/event-registry/abstract-event.ts
Show resolved
Hide resolved
webapp/src/app/components/widgets/event-widget/event-registry/abstract-event.ts
Outdated
Show resolved
Hide resolved
webapp/src/app/components/widgets/event-widget/event-registry/set-msg-expression.ts
Show resolved
Hide resolved
webapp/src/app/components/widgets/event-widget/event-registry/show-modal-choice.ts
Outdated
Show resolved
Hide resolved
webapp/src/app/components/widgets/event-widget/event-registry/show-modal-choice.ts
Outdated
Show resolved
Hide resolved
On the topic of colours... I recently found that the ones used by the real editor are all stored in the game bundle. Why don't we copy over those? For example, this can be found in wm.addStepColorRule(/SHOW_CHOICE/, "red"); |
While I am not against that, I do feel that does go beyond the scope of my PR and should be settled separately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that. I should have described it more precisely what I meant with adding types
@@ -10,7 +11,7 @@ interface AddMsgPersonData extends EventType { | |||
} | |||
|
|||
export class AddMsgPerson extends AbstractEvent<AddMsgPersonData> { | |||
private attributes = { | |||
private attributes: EntityAttributes = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to add EntityAttributes
everywhere. If you want to update these events you can instead extend from DefaultEvent
which makes the attributes
property unnecessary.
const textColors = [ | ||
null, | ||
'#ff6969', | ||
'#65ff89', | ||
'#ffe430', | ||
'#808080', | ||
'#ff8932', | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I forgot that orange is only rendered in the small font by default. I'll just disable it then.
As for the \c[6] (and other invalid colors), I do agree it should remain rendered just so the user will know they made a mistake as you said. I believe that was my intent in doing it like that from the beginning.
webapp/src/app/components/widgets/event-widget/event-registry/set-msg-expression.ts
Outdated
Show resolved
Hide resolved
webapp/src/app/components/widgets/event-widget/event-registry/show-choice.ts
Outdated
Show resolved
Hide resolved
webapp/src/app/components/widgets/event-widget/event-registry/show-modal-choice.ts
Outdated
Show resolved
Hide resolved
webapp/src/app/components/widgets/event-widget/event-registry/abstract-event.ts
Outdated
Show resolved
Hide resolved
webapp/src/app/components/widgets/event-widget/event-registry/abstract-event.ts
Outdated
Show resolved
Hide resolved
webapp/src/app/components/widgets/event-widget/event-registry/show-modal-choice.ts
Outdated
Show resolved
Hide resolved
There, I added types to what should be everything in |
I have over the past few days made a few improvements to the event/action step editor.
SHOW_MODAL_CHOICE
, in a similar manner toSHOW_CHOICE
(closes Event SHOW_MODAL_CHOICE not supported #246).SET_MSG_EXPRESSION
is now properly supported.Vec2
,Vec3
,Offset
,Entity
,EnemyType
,NumberExpression
,StringExpression
,BooleanExpression
,VarName
,Effect
, andAnimation
.VarCondition
s now use the string editing widget as opposed to the JSON editor. (applies to the entity editor as well).Editor before:
![image](https://private-user-images.githubusercontent.com/49847844/261861237-9f349269-9469-4d56-8c1c-5a13f5ff87c5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MTc3MTMsIm5iZiI6MTczOTUxNzQxMywicGF0aCI6Ii80OTg0Nzg0NC8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I5MDQ1YjE3YTA5ZTM4MWVmZjdmZjYzNTE4YTgyNjE4ZWQ4ZmUxZmE4ZGFiMWQxNzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Omze3huOk-EFrFsUFS0miSN2lIqP179NQf0vtRMLt5E)
Editor after:
![image](https://private-user-images.githubusercontent.com/49847844/261861266-90549004-a6e0-48c3-9925-ef2f1947a3a9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MTc3MTMsIm5iZiI6MTczOTUxNzQxMywicGF0aCI6Ii80OTg0Nzg0NC8yNjE4NjEyNjYtOTA1NDkwMDQtYTZlMC00OGMzLTk5MjUtZWYyZjE5NDdhM2E5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA3MTY1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRlY2ZkYTk5YmYxZDViZmE4ZjFiZDVjOWViNjYxZjI0YzI5NjUxMWVlNzVmZjBmODNkZmQxNTFkMTI4NDdiYjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.44EL52QHOVaVnu662sx9Lpc4k9BY7UtSOtIjFpsUSFk)
![image](https://private-user-images.githubusercontent.com/49847844/261821895-14278cec-dcba-4596-b7f1-a6eb3f5e2197.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MTc3MTMsIm5iZiI6MTczOTUxNzQxMywicGF0aCI6Ii80OTg0Nzg0NC8yNjE4MjE4OTUtMTQyNzhjZWMtZGNiYS00NTk2LWI3ZjEtYTZlYjNmNWUyMTk3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA3MTY1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE5MzYyYzc5YmUwY2RkMDAzZjM0NzE0MjYxNjUyM2ZmNGQ3NmViMDY5MWFmMzljNzY4ZTViNDI0N2FiOGEzMjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.imnxB5cq517WffInElFwwoJNzo1zLovs47N_tdndKkQ)